package com.airycode.distribution.distribution1.base;

import com.fasterxml.jackson.annotation.JsonProperty;

import java.util.ArrayList;
import java.util.List;

/**
 * @author admin
 * @date 2017/8/15
 */
public class ListResult<T> extends BaseResult {

    private static final long serialVersionUID = 607254008155308777L;

    @JsonProperty("result")
    private List<T> list;

    public ListResult() {
    }


    public ListResult(List<T> list) {
        this.list = list;
    }

    public List<T> getList() {
        if (list == null) {
            return new ArrayList<>();
        }
        return list;
    }

    public void setList(List<T> list) {
        this.list = list;
    }

}
